package org.osoftware.mumi.dao.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class PaymentConcept.
 */
@Entity
@Table(name="payment_concept")
public class PaymentConcept extends BaseObject {
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 8658010048188856550L;
	
	/** The name. */
	@Column(name="name")
	private String name;
	
	/** The description. */
	@Column(name="description")
	private String description;
	
	/** The payment concept type. */
	@Column(name="payment_concept_type")
	@Enumerated(EnumType.STRING)
	private PaymentConceptType paymentConceptType;
	
	/** The payment details. */
	@OneToMany
	@JoinColumn(name = "payment_concept_id", updatable = false, insertable = false, nullable=false)
	private List<PaymentDetail> paymentDetails;
	
	
	
	/**
	 * Gets the payment details.
	 *
	 * @return the payment details
	 */
	public List<PaymentDetail> getPaymentDetails() {
		return paymentDetails;
	}

	/**
	 * Sets the payment details.
	 *
	 * @param paymentDetails the new payment details
	 */
	public void setPaymentDetails(List<PaymentDetail> paymentDetails) {
		this.paymentDetails = paymentDetails;
	}

	/**
	 * Gets the name.
	 *
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Sets the name.
	 *
	 * @param name the new name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Gets the description.
	 *
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	
	/**
	 * Sets the description.
	 *
	 * @param description the new description
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * Gets the payment concept type.
	 *
	 * @return the payment concept type
	 */
	public PaymentConceptType getPaymentConceptType() {
		return paymentConceptType;
	}
	
	/**
	 * Sets the payment concept type.
	 *
	 * @param paymentConceptType the new payment concept type
	 */
	public void setPaymentConceptType(PaymentConceptType paymentConceptType) {
		this.paymentConceptType = paymentConceptType;
	}

	/* (non-Javadoc)
	 * @see org.osoftware.mumi.dao.model.BaseObject#toString()
	 */
	@Override
	public String toString() {
		return "PaymentConcept [name=" + name + ", description=" + description
				+ ", paymentConceptType=" + paymentConceptType
				+ ", toString()=" + super.toString() + "]";
	}
	
}
